<?
require_once("lang.php");

$iBan = getValue("iBan");
$db_banner = new db_query("SELECT ban_link FROM banners WHERE ban_id = " . $iBan . " AND lang_id = " . $lang_id);
if($banner = mysql_fetch_assoc($db_banner->result)){
	$db_banner_click = new db_execute("UPDATE banners SET ban_hits = ban_hits + 1 WHERE ban_id = " . $iBan);
	unset($db_banner_click);
	redirect($banner["ban_link"]);
}
$db_banner->close();
unset($db_banner);
?>